<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
	  xmlns:rich="http://richfaces.org/rich"
	  xmlns:c="http://java.sun.com/jstl/core"
	  xmlns:p="http://primefaces.prime.com.tr/ui">
      
	<head>
		<style type="text/css">
			body {
			  font-size: 11px;
			}
		</style>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title><h:outputText value="#{msg.webcotec}"/> - <h:outputText value="#{msg.webcotecdescricao}"/></title>
		<link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/themes-primefaces/cupertino/skin.css" ></link>
		<link href="#{facesContext.externalContext.requestContextPath}/styles/gerenciadorChamados.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/js/gc_common.js" ></script>
		<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/js/jquery.maskedinput-1.2.2.js"></script>
		<p:resources/>
	</head>
	
	<body>
		<ui:include src="/inboxes/modalPanel/escolhaPessoaMBForm.xhtml" />
		<h:form id="idOcorrenciaMBForm" rendered="true">
			<rich:panel id="idPanelOcorrencia">
				<p:messages globalOnly="true" rendered="true"/>
				<f:facet name="header">
					<h:outputText value="#{msg.ocorrencia}" />
				</f:facet>

				<fieldset id="legend_area"><legend id="legend"><h:outputLabel
					value="#{msg.ocorrenciaDados}" /></legend> 
					<p:dataTable id="ocorrenciaMover" 
						 var="inbox" 
						 value="#{inboxesMB.inboxSelectedList}" 
						 rows="5">
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{msg.codigo}" />
							</f:facet>
							<h:outputText value="#{inbox.codigo}" style="font-weight: bold;"/>
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{msg.titulo}" />
							</f:facet>
							<h:outputText value="#{inbox.titulo}" style="font-weight: bold;"/>
						</p:column>
					</p:dataTable>
					<h:panelGrid columns="2">
						<h:panelGroup>
							<br />
							<h:outputLabel value="#{msg.responsavel}" for="idResponsavelOco" />
						</h:panelGroup>
						<h:panelGroup>
							<h:inputText id="idResponsavelOco"
								value="#{ocorrenciaMB.moverOcorrencia.pessoaResponsavel.nome}" size="50" maxlength="45"
								onkeyup="javascript:toUpperCase(this);" readonly="true">
								<rich:ajaxValidator event="onblur" />
							</h:inputText>
							<h:outputLink value="#" id="link" >
									<h:outputLabel value="#{msg.botaoLocalizar}" for="link"/>
							        <rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/>
						    </h:outputLink>
						</h:panelGroup>
					</h:panelGrid>
				</fieldset>
				<br />
				<h:panelGrid columns="2" width="100%" style="text-align:center;">
					<h:panelGroup>
						<a4j:commandButton value="#{msg.botaoMover}" onclick="window.close();"
							action="#{ocorrenciaMB.moverParaInbox}" reRender="inboxList"
							style="text-align:center;" />
							<h:commandLink value="#{msg.botaoAtualizarTela}">
								<a4j:support reRender="inboxGeralMBForm.inboxList" event="onclick"/>
							</h:commandLink>				
					</h:panelGroup>
				</h:panelGrid>
			</rich:panel>
		</h:form>
	</body>
		
</html>